﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace PhotoList.Dal
{
    public class Menu
    {
        #region Attributes

        private string t_id = "";
        public string ID
        {
            set { this.t_id = value.Trim(); }
            get { return this.t_id.Trim(); }
        }

        private string t_name = "";
        public string Name
        {
            set { this.t_name = value.Trim(); }
            get { return this.t_name.Trim(); }
        }

        private string t_group = "";
        public string Group
        {
            set { this.t_group = value.Trim(); }
            get { return this.t_group.Trim(); }
        }

        private string t_user = "";
        public string User
        {
            set { this.t_user = value.Trim(); }
            get { return this.t_user.Trim(); }
        }

        private string t_path = "";
        public string Path
        {
            set { this.t_path = value.Trim(); }
            get { return this.t_path.Trim(); }
        }

        #endregion

        public Menu()
        {
        }

        public Menu(string ID)
        {
            this.t_id = ID;
            LoadMe();
        }

        #region Method

        private void LoadMe()
        {
            DBO.FuncStruct fs = DBO.LoadFuncs(this.t_id);

            if (fs.id != "")
            {
                this.t_id = fs.id;
                this.t_name = fs.name;
                this.t_group = fs.group;
                this.t_user = fs.user;
                this.t_path = fs.path;
            }
        }

        public DataTable GetFuncs()
        {
            DataTable dt = new DataTable();


            return dt;
        }

        public DataTable GetFuncs(string uID)
        {
            DataTable dt = new DataTable();

            return dt;
        }

        #endregion

    }
}
